/**
 * 
 */
package com.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.entity.User;
import com.wcansoft.baseWeb.mybatis_plugin.dao.MybatisBaseDAO;



/**
 * 
 * 
 * 
 * 
 *
 *@类名称：UserMapper.java
 *@类描述：用户map
 *@创建人：zhongy
 *@创建时间：2017年5月2日-下午10:13:34
 *@修改备注:
 *@version
 */

public interface UserMapper extends MybatisBaseDAO<User>{

	@Select("select * from user where userName=#{userName} and passwd=#{passwd}")
	User getUserByUserNamePasswd(@Param("userName") String userName,@Param("passwd") String passwd);
	
	@Select("select * from user where userName=#{userName}")
	User getUserByUserName(String userName);
	
	@Select("select * from user where id=#{uid} and passwd=#{token}")
	User getUserByUidPasswd(@Param("uid") Long uid,@Param("token") String token);

	
	@Select("select SUM(vscore) from user_checkin_log where userId=#{0}")
	Long getUserCheckinVscore(Long uid);
	
	
	
}
